<?php
include("../inc/Function.php");
// if($_SESSION['a']['alevel']!=5 && $power['scdd']!=1){
// 	echo "<script>alert('权限不足');window.location.href='index.php';</script>";exit;
// }
$oid = isset($_GET['oid'])?intval($_GET['oid']):0;
$uid = isset($_GET['uid'])?$_GET['uid']:0;
$state = isset($_GET['state'])?$_GET['state']:4;
$cplx = isset($_GET['cplx'])?$_GET['cplx']:0;
$code = isset($_GET['code'])?$_GET['code']:"";
$tname = isset($_GET['tname'])?$_GET['tname']:"";
$uname = isset($_GET['uname'])?$_GET['uname']:"";
$time = isset($_GET['time'])?$_GET['time']:"";
$gname = isset($_GET['gname'])?$_GET['gname']:"";
$page = isset($_GET['page'])?$_GET['page']:"";
$type = isset($_GET['type'])?$_GET['type']:0;

if($_SESSION['a']['alevel']!=5){
    if($power['scdd']!=1){
        echo "<script>alert('权限不足');window.location.href='index.php';</script>";exit;
    }
}
$info = orders($oid);
if(!$info){
	echo "<script>window.location.href='orderlist.php';</script>";exit;
}
$goods = json_decode($info['goods'],true);
$tpl->assign('info',$info);
$tpl->assign('goods',$goods);
$tpl->assign('uid',$uid);
$tpl->assign('state',$state);
$tpl->assign('cplx',$cplx);
$tpl->assign('type',$type);
$tpl->assign('code',$code);
$tpl->assign('tname',$tname);
$tpl->assign('uname',$uname);
$tpl->assign('time',$time);
$tpl->assign('gname',$gname);
$tpl->assign('page',$page);
$tpl->assign('oid',$oid);
$tpl->assign('payarr',$payarr);
$tpl->show('orders');
?>